package com.itheima.zhuanhuan;

import com.itheima.domain.Student;

/*
字符串 "张三,28"
把他拆开 放入 学生对象
 */
public class Test {

    public static void main(String[] args) {
        String s="张三,28";
        String[] studentInfo = s.split(",");
        String name = studentInfo[0];
        String ageStr = studentInfo[1];
        int age = Integer.parseInt(ageStr);
        Student student = new Student(name, age);
        System.out.println(student);
    }
}
